package com.dragon.mmochat.message;

import com.dragon.mmochat.MmochatConstant;
import com.skymobi.buffer.SkymobiBuffer;
import com.skymobi.message.SkymobiModuleMessage;

public class Mmochat_SendSuggestAward extends SkymobiModuleMessage {
	private int srcModuleId; // 发起请求的实例号
	private int dstModuleId; // 目标实例号(推荐人所在的区服实例号)
	private int suggestRoleId; // 推荐人的roleId
	private int awardCount; // 奖励的积分数额
	private String awardMsg;// 奖励的消息

	public Mmochat_SendSuggestAward() {
		setMsgCode(MmochatConstant.MSGCODE_MMOCHAT_C_1_26);
	}

	@Override
	protected void decodeBody(SkymobiBuffer in) {
		suggestRoleId = in.getInt();
		awardCount = in.getInt();
		awardMsg = in.getPrefixedString(2);
	}

	@Override
	protected void encodeBody(SkymobiBuffer out) {
		out.putInt(suggestRoleId);
		out.putInt(awardCount);
		out.putPrefixedString(awardMsg, 2);
	}

	public int getDstModuleId() {
		return dstModuleId;
	}

	public void setDstModuleId(int dstModuleId) {
		this.dstModuleId = dstModuleId;
		setDstId(dstModuleId);
	}

	public int getSrcModuleId() {
		return srcModuleId;
	}

	public void setSrcModuleId(int srcModuleId) {
		this.srcModuleId = srcModuleId;
		setSrcId(srcModuleId);
	}

	public int getSuggestRoleId() {
		return suggestRoleId;
	}

	public void setSuggestRoleId(int suggestRoleId) {
		this.suggestRoleId = suggestRoleId;
	}

	public int getAwardCount() {
		return awardCount;
	}

	public void setAwardCount(int awardCount) {
		this.awardCount = awardCount;
	}

	public String getAwardMsg() {
		return awardMsg;
	}

	public void setAwardMsg(String awardMsg) {
		this.awardMsg = awardMsg;
	}

}
